<?php

/**
 * game.php: the game page
 *
 * @author vbolshov
 */

include dirname(__FILE__) . '/../setup.php';

use quext\Quext;
use quext\Renderer;

if (! $quext = Quext::find(filter_var($_SERVER['QUERY_STRING'], FILTER_VALIDATE_INT))->fetchOne())
{
	die('Cannot find this page');
}

$layout = Renderer::getLayout('game.tpl.php');
$layout->title = $quext->title;
$layout->quext = $quext;
$layout->child_nodes = $quext->getChildNodes();

$layout->render();